<script src="./public/layui/layui.js"></script>


<script>
    layui.use(function () {
        $ = layui.$
        $('#account').click(() => {
            layer.open({
                type: 2
                , area: ['80%', '80%']
                , content: '?p=admin&c=account&a=index'
            })
        })
        $('#logout').click(() => {
            $.get('?p=admin&c=login&a=logout', (res) => {
                if (res.code == 200) {
                    layer.msg('退出成功')
                    setTimeout(() => {
                        window.location.href = '?p=admin&c=login'
                    }, 2000)
                }
            })
        })
    })
</script>